package com.online_exam.repository;


import com.online_exam.domain.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CommentMapper {
    List<Comment> findByQuestionIdParentIdNull(@Param("questionId") int questionId);

    List<Comment> findByQuestionIdAndParentId(@Param("questionId") int questionId, @Param("parentId") int parentId);

    int addCommentsById(Comment comment);

    int deleteCommentsById(int id);
}
